package cn.mn.ac.demo.comsumer;

import cn.mn.ac.rocketmq.annotation.ConsumerListener;
import cn.mn.ac.rocketmq.annotation.OnsConfiguration;
import cn.mn.ac.rocketmq.consumer.RocketListener;
import com.aliyun.openservices.ons.api.Action;
import com.aliyun.openservices.ons.api.ConsumeContext;
import com.aliyun.openservices.ons.api.Message;
import lombok.extern.slf4j.Slf4j;

/**
 * @author hefulin
 * @date 2022/8/30 14:44
 */
@Slf4j
@ConsumerListener(topic = "DEV_DELAY", group = "DEV_GROUP",tags = "dev_test_tag")
@OnsConfiguration
public class ExampleDelayConsumerListener implements RocketListener<String> {

    @Override
    public Action consume(Message message, String messageBody, ConsumeContext consumeContext) {
        log.info("Message:{}", message);
        return Action.CommitMessage;
    }
}
